<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/template.xhtml">
	<ui:define name="tituloPagina">
		<p:outputLabel value="#{msgs['paginas.concluir.compromisso']}" />
	</ui:define>
	<ui:define name="principal">
		<p:panelGrid columns="2" style="width: 100%;">
			<p:outputLabel value="#{msgs['campos.titulo.reuniao']}" />
			<p:outputLabel
				value="#{compromissoBean.compromisso.reuniao.dataReuniao}"
				disabled="true" style="width: 225px;">
				<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="GMT-03:00" />


			</p:outputLabel>

			<p:outputLabel value="#{msgs['campos.titulo.numero.compromisso']}" />
			<p:outputLabel style="width: 100%;"
				value="#{compromissoBean.compromisso.numeroCompromisso}"
				disabled="true" />



			<p:outputLabel value="#{msgs['campos.titulo.prazo.conclusao']}" />
			<p:outputLabel style="width: 225px;" disabled="true"
				value="#{compromissoBean.compromisso.metaConclusao}">
				<f:convertDateTime pattern="dd/MM/yyyy" timeZone="GMT-03:00" />

			</p:outputLabel>

			<p:outputLabel value="#{msgs['campos.titulo.solicitante']}" />
			<p:outputLabel style="width: 225px;"
				value="#{compromissoBean.compromisso.solicitante.nome}"
				disabled="true" />


			<p:outputLabel value="#{msgs['campos.titulo.responsavel']}" />
			<p:outputLabel style="width: 225px;"
				value="#{compromissoBean.compromisso.pessoa.nome}" disabled="true" />



			<p:outputLabel value="#{msgs['campos.titulo.projeto']}" />
			<p:outputLabel style="width: 225px;"
				value="#{compromissoBean.compromisso.projeto.nome}" disabled="true" />


			<p:outputLabel value="#{msgs['campos.titulo.descricao']}" />
			<p:outputLabel rows="5" style="width: 787px"
				value="#{compromissoBean.compromisso.descricao}" disabled="true" />

			<p:outputLabel value="#{msgs['campos.titulo.data.conclusao']}" />
			<p:calendar id="popupButtonCal" showOn="button" required="true"
				locale="pt_BR" pattern="dd/MM/yyyy" style="width: 787px;"
				value="#{compromissoBean.compromissoConluido.dataConclusao}"></p:calendar>
			<p:outputLabel value="#{msgs['campos.titulo.observacoes']}" />
			<p:inputTextarea rows="6" style="width: 787px;"
				value="#{compromissoBean.compromissoConluido.observacao}"></p:inputTextarea>

			<p:outputLabel value="Arquivo:" />

			<p:fileUpload value="#{compromissoBean.file}" mode="simple"
				required="false">
			</p:fileUpload>
		</p:panelGrid>

		<p:messages severity="info" escape="false" showDetail="true"
			autoUpdate="true" closable="true" />

		<p:commandButton value="Concluir"
			action="#{compromissoBean.atualizarSituacaoCompromissoConcluido()}"
			actionListener="#{compromissoBean.handleFileUpload()}" ajax="false">
		</p:commandButton>


		<p:commandButton value="Cancelar"
			action="#{compromissoBean.cancelarConclusaoCompromisso()}"
			immediate="true" ajax="false"></p:commandButton>

	</ui:define>
</ui:composition>
</html>